var base = require('./base');

var Grade_Schema = new base.Schema({
    openid: {　// 成绩人
        type:String
    },
    course_name: {　// 课程名
        type:String
    },
    course_term: {  //　学期
        type:String
    },
    grade: { // 成绩
        type:String
    },
    course_type: {  // 课程类型、必修选修
        type:String
    },
    course_hours: {
        type:String
    },
    createTime: {
        type: Date,
        default: Date.now
    },
    updateTime: {
        type: Date,
        default: Date.now
    }
}, {
    versionKey: false,
    timestamps: { createdAt: 'createTime', updatedAt: 'updateTime' }
});
Grade_Schema.index({openid:1});

var Grade = base.mongoose.model('Grade', Grade_Schema);

module.exports = Grade;
